<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 148 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */

 /* Position Styles */
 .ts148p0{position:absolute;left:106px;top:97px;}
 .ts148p1{position:absolute;left:352px;top:97px;}
 .ts148p3{position:absolute;left:665px;top:97px;}
 .ts148p7{position:absolute;left:106px;top:113px;}
 .ts148p8{position:absolute;left:706px;top:1026px;}
 .ts148p9{position:absolute;left:331px;top:1044px;}
 .ts148p13{position:absolute;left:106px;top:147px;}
 .ts148p15{position:absolute;left:202px;top:147px;}
 .ts148p16{position:absolute;left:106px;top:165px;}
 .ts148p17{position:absolute;left:106px;top:184px;}
 .ts148p18{position:absolute;left:106px;top:202px;}
 .ts148p20{position:absolute;left:106px;top:221px;}
 .ts148p21{position:absolute;left:106px;top:240px;}
 .ts148p23{position:absolute;left:106px;top:258px;}
 .ts148p25{position:absolute;left:106px;top:276px;}
 .ts148p28{position:absolute;left:106px;top:294px;}
 .ts148p30{position:absolute;left:106px;top:313px;}
 .ts148p32{position:absolute;left:106px;top:331px;}
 .ts148p34{position:absolute;left:106px;top:349px;}
 .ts148p36{position:absolute;left:106px;top:367px;}
 .ts148p38{position:absolute;left:106px;top:385px;}
 .ts148p39{position:absolute;left:106px;top:404px;}
 .ts148p40{position:absolute;left:106px;top:422px;}
 .ts148p41{position:absolute;left:106px;top:441px;}
 .ts148p43{position:absolute;left:106px;top:459px;}
 .ts148p44{position:absolute;left:106px;top:477px;}
 .ts148p45{position:absolute;left:106px;top:496px;}
 .ts148p47{position:absolute;left:106px;top:514px;}
 .ts148p48{position:absolute;left:106px;top:533px;}
 .ts148p50{position:absolute;left:106px;top:551px;}
 .ts148p51{position:absolute;left:106px;top:570px;}
 .ts148p54{position:absolute;left:106px;top:588px;}
 .ts148p55{position:absolute;left:106px;top:607px;}
 .ts148p57{position:absolute;left:106px;top:625px;}
 .ts148p58{position:absolute;left:106px;top:643px;}
 .ts148p60{position:absolute;left:106px;top:661px;}
 .ts148p62{position:absolute;left:106px;top:679px;}
 .ts148p64{position:absolute;left:106px;top:697px;}
 .ts148p66{position:absolute;left:106px;top:715px;}
 .ts148p68{position:absolute;left:106px;top:733px;}
 .ts148p70{position:absolute;left:106px;top:752px;}
 .ts148p72{position:absolute;left:106px;top:770px;}
 .ts148p74{position:absolute;left:106px;top:788px;}
 .ts148p76{position:absolute;left:106px;top:806px;}
 .ts148p78{position:absolute;left:106px;top:824px;}
 .ts148p79{position:absolute;left:106px;top:842px;}
 .ts148p82{position:absolute;left:106px;top:860px;}
 .ts148p85{position:absolute;left:731px;top:860px;}
 .ts148p86{position:absolute;left:106px;top:878px;}
 .ts148p88{position:absolute;left:106px;top:897px;}
 .ts148p90{position:absolute;left:106px;top:915px;}
 .ts148p92{position:absolute;left:106px;top:933px;}
 .ts148p93{position:absolute;left:106px;top:951px;}
 .ts148p95{position:absolute;left:106px;top:969px;}

 /* Font Styles */
 .ft0p148{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p148{font-weight:normal;}
 .ft2p148{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p148{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p148{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p148{font-style:normal;font-weight:normal;font-size:16px;font-family:"courier new",courier,monospace;color:#000000;}
 .ft6p148{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}

 /* Background Style */
 .styleBackground148{position:absolute;left:97px;top:145px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index147.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;148 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index149.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground148><img src="./background148.png" width="633" height="910" border="0" alt=""></div>
<div class=ts148p0><span class="ft0p148"> </span></div>
<div class=ts148p1><span class="ft0p148">Gravitybox Schedule Primer<span class="ft1p148"> </span></span></div>
<div class=ts148p3><span class="ft0p148">Page 146&nbsp; </span></div>
<div class=ts148p7><span class="ft2p148"> </span></div>
<div class=ts148p8><span class="ft3p148"> </span></div>
<div class=ts148p9><span class="ft4p148">1998&#45;2004 Gravitybox Software LLC<span class="ft3p148"> </span></span></div>
<div class=ts148p13><span class="ft5p148">End Sub </span></div>
<div class=ts148p15><span class="ft5p148"> </span></div>
<div class=ts148p16><span class="ft6p148"> </span></div>
<div class=ts148p17><span class="ft6p148">The Print menu item will tell the active form to print itself. Every child knows how to print </span></div>
<div class=ts148p18><span class="ft6p148">itself as well. </span></div>
<div class=ts148p20><span class="ft6p148"> </span></div>
<div class=ts148p21><span class="ft5p148">Private Sub mnuFilePrint_Click() </span></div>
<div class=ts148p23><span class="ft5p148">&nbsp;&nbsp; </span></div>
<div class=ts148p25><span class="ft5p148">&nbsp; If MsgBox(&#34;Do you wish to print the active schedule?&#34;, _ </span></div>
<div class=ts148p28><span class="ft5p148">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vbYesNo + vbQuestion, &#34;Print?&#34;) = vbYes Then </span></div>
<div class=ts148p30><span class="ft5p148">&nbsp;&nbsp;&nbsp; Call Me.ActiveForm.PrintFile </span></div>
<div class=ts148p32><span class="ft5p148"> End If </span></div>
<div class=ts148p34><span class="ft5p148">&nbsp; </span></div>
<div class=ts148p36><span class="ft5p148">End Sub </span></div>
<div class=ts148p38><span class="ft6p148"> </span></div>
<div class=ts148p39><span class="ft6p148"> </span></div>
<div class=ts148p40><span class="ft6p148">In order to prompt the user for dates we will need to construct a form for this action. We </span></div>
<div class=ts148p41><span class="ft6p148">only need to create a form with a textbox and two command buttons. The textbox will be </span></div>
<div class=ts148p43><span class="ft6p148">used to type in the date and the command buttons will be the &#147;Ok&#148; and &#147;Cancel&#148; </span></div>
<div class=ts148p44><span class="ft6p148">buttons. In the Ok button&#146;s code we will need to check that the entered date is valid with </span></div>
<div class=ts148p45><span class="ft6p148">the VBA &#147;IsDate&#148; function. To ensure that we do not load a date twice we will need to </span></div>
<div class=ts148p47><span class="ft6p148">check the loaded child forms and verify that their dates are different than the target </span></div>
<div class=ts148p48><span class="ft6p148">date. The IsDateLoaded method is on the MDI parent form and is used for this purpose. </span></div>
<div class=ts148p50><span class="ft6p148"> </span></div>
<div class=ts148p51><span class="ft5p148">Private Function IsDateLoaded(ByVal dtDate As Date) As Boolean </span></div>
<div class=ts148p54><span class="ft5p148"> </span></div>
<div class=ts148p55><span class="ft5p148">Dim F As Form </span></div>
<div class=ts148p57><span class="ft5p148"> </span></div>
<div class=ts148p58><span class="ft5p148">&nbsp; For Each F In Forms </span></div>
<div class=ts148p60><span class="ft5p148">&nbsp;&nbsp;&nbsp; If F.Name = &#34;frmChild&#34; Then </span></div>
<div class=ts148p62><span class="ft5p148">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If F.MyDate = dtDate Then </span></div>
<div class=ts148p64><span class="ft5p148">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IsDateLoaded = True </span></div>
<div class=ts148p66><span class="ft5p148">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GoTo EndSub </span></div>
<div class=ts148p68><span class="ft5p148">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If </span></div>
<div class=ts148p70><span class="ft5p148">&nbsp;&nbsp;&nbsp; End If </span></div>
<div class=ts148p72><span class="ft5p148">&nbsp; Next </span></div>
<div class=ts148p74><span class="ft5p148">&nbsp;&nbsp; </span></div>
<div class=ts148p76><span class="ft5p148">EndSub: </span></div>
<div class=ts148p78><span class="ft5p148"> </span></div>
<div class=ts148p79><span class="ft5p148">End Function </span></div>
<div class=ts148p82><span class="ft5p148">'This function will ensure that the Date has no round&#45;off error </span></div>
<div class=ts148p85><span class="ft5p148"> </span></div>
<div class=ts148p86><span class="ft5p148">Public Function GetDate(ByVal dtDate As Date) As Date </span></div>
<div class=ts148p88><span class="ft5p148">&nbsp; GetDate = DateSerial(Year(dtDate), _ </span></div>
<div class=ts148p90><span class="ft5p148">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Month(dtDate), Day(dtDate)) </span></div>
<div class=ts148p92><span class="ft5p148"> </span></div>
<div class=ts148p93><span class="ft5p148">End Function </span></div>
<div class=ts148p95><span class="ft6p148"> </span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
